/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.tomasio.projects.welcome.model;

import com.tomasio.projects.welcome.dto.EmailDTO;



/**
 *
 * @author fernandofot
 */
public class Email {

    private String address;

    public Email() {
    }

    public Email(EmailDTO dto) {
        if (dto != null) {
            address = dto.getAddress();
        }

    }

    public Email(String address) {
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public EmailDTO createDTO() {
        EmailDTO dto = new EmailDTO();
        dto.setAddress(address);
        return dto;
    }
}
